package cn.samler.shopapi.Mapper;

import cn.samler.shopapi.Entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    Integer findId(String id);

    Order findById(@Param("uid") int uid, @Param("trade_no") String id);

    List<Order> listOrder(@Param("uid") int uid, @Param("start") int start, @Param("offset") int offset);

    List<Order> listOrderByStatus(@Param("uid") int uid, @Param("status") int status, @Param("start") int start, @Param("offset") int offset);

    boolean create(Order order);

    boolean confirmOrder(@Param("uid") int uid, @Param("trade_no") String id);

    boolean cancelOrder(@Param("uid") int uid, @Param("trade_no") String id);

    boolean payment(@Param("uid") int uid, @Param("trade_no") String id, @Param("pay_type") String payType);

}
